import Vue from 'vue'
import Router from 'vue-router'
import Login from '@/components/login/login'
import Application from '@/components/application/application'

Vue.use(Router)

const routes = [
  {
    path: '/',
    redirect: '/login'
  },
  {
    path: '/login',
    name: 'login',
    component: Login
  },
  // {
  //   path: '/company-info',
  //   name: 'company-info',
  //   component: () => import('../components/company-info/companyInfo.vue')
  // },
  // {
  //   path: '/customer-info',
  //   name: 'customer-info',
  //   component: () => import('../components/customer-info/customerInfo.vue')
  // }

  {
    path: '/application',
    name: 'app',
    component: Application,
    children: [
      {
        name: 'company-info',
        path: 'company-info',
        component: () => import('../components/application/company-info/companyInfo.vue')
      },
      // {
      //   name: 'person-manage',
      //   path: 'person-manage',
      //   component: () => import('../components/application/person-manage/personManage.vue')
      // },
      // {
      //   name: 'attend-manage',
      //   path: 'attend-manage',
      //   component: () => import('../components/application/attend-manage/attendManage.vue')
      // },
      {
        name: 'person-plan',
        path: 'person-plan',
        component: () => import('../components/application/person-plan/personPlan.vue')
      },
      // {
      //   name: 'staff_world',
      //   path: 'staff_world',
      //   component: () => import('../components/application/staff_world/staff_world.vue')
      // },
      // {
      //   name: 'Corporate_performance',
      //   path: 'Corporate_performance',
      //   component: () => import('../components/application/Corporate_performance/Corporate_performance.vue')
      // },
      // {
      //   name: 'Audit_instructions',
      //   path: 'Audit_instructions',
      //   component: () => import('../components/application/Audit_instructions/Audit_instructions.vue')
      // },
      {
        name: 'customer-info',
        path: 'customer-info',
        component: () => import('../components/application/customer-info/customerInfo.vue')
      },
      {
        name: 'project-state',
        path: 'project-state',
        component: () => import('../components/application/customer-info/projectState.vue')
      },
      {
        name: 'order-manage',
        path: 'order-manage',
        component: () => import('../components/application/customer-info/orderManage.vue')
      }
    ]
  }
]

export default new Router({
  routes
})
